Cleanup functions in FileWrapper