handle some I/O exceptions