Error: Operation is not allowed when the object is closed.Operation is not allowed when the object is closed.