>Also, regarding your approach of DEBUGOUT. I thought that DEBUGOUT only works when running the app from IDE, not when executing it as .EXE on customer system. Am I wrong about it?
Then textmerge all the same info that went into debugout into a string, and log that string.