Cleanup on loading files