adding more debugging code for control script