Add error handling callbacks to standard file operations.