Handle more cases of I/O errors