Ok, it fucking ran
now distinguishes new and readded, but always updates readded
now with some formatting
update
ok, now works correctly - but confusing, why is it iterating over all the file_ids? they're not being correctly identified
ok, it seems to work going through the new, delete, readded sequence
add logging to track id that changes