Added debugging to python script