file IO error messages corrected for easier debugging