If you can't open the file with SD.open(filename), then there are normally two reasons.
- Opening a SD file takes a lot of SRAM, and you ran out.
- The file doesn't exist
I get an error but when I try to open it on startup its working OK.
Post the code that did work when you opened the file in setup().