Operation is not allowed when the object is closed.