Our friend has a problem saying what he means. It seems that the "input" is actually a directory structure containing the path DCMS_DEMO/new_block2/checklist_tmp/rev1, and the "output" is what some file is getting renamed to (not what's printed by any of the random debugging prints). Also, he's run 57 different varieties of his script and he's confused about which runs produced which results.