Add FileOperationError and handling in item.write()