processIOException

Handle IOExceptions thrown while writing.