Adding some debugging print statements. Also fixing a bug in renaming
code