renamed do_rename to print_and_rename