Make sure the file exists before reading it.