Improved cleanup for data-files junction table