Fix a minor error with the way the python dicts were created (missing newline)
Add a lot of debug to the python dictionary creation code