Change the update_files script to update only orphaned files.
Also check if existing metadata is still correct.
Towards #295