Thanks for your response Ray,
I have OSPi. Debug is enabled by default. I could not see debug info in console, neither was able to forward it into a file. However if I start the program directly and not using the init script the debug lines appear. It is good enough so far.