Updated I/O error messages to be more informative.