Update #9
Correct metadata file GC and add temp_directory GC (with correct temp default directory).