Get the file-size before .storage is set to None
Add missing table.close() in test
Fix mock_storage in unittest