Hi Michael,
Thats the disadvantage of scripts. We cant see logs in CC monitoring or anywhere. Do one thing, try to write logs into a log file in app server using "echo" at different stages of the code. You might get some idea on what's happening really.