added I/O error handling