ensure file exists before reading.