Debugging the ondemand code