Add debug output to python