deleted_files refactoring