Make sure the file exists before trying to open it