Added file validation

Make sure the file exists before trying to read it.