Refactor file move/delete.