refactor the photo_rename tool