Data copying in presence of I/O errors