Handle IOExceptions rather than throwing them