It should return success here.

For a file object that has already been moved to others, it is OK to delete it, which calls close() in the destructor.