ENH: raise ClosedFileError if an operation is attempted on a closed file