I removed traceCommand because I needed a more fine grained control of what goes into the log.
in fine tuning still needs to be done. But is reasonably OK now.