moving logging to system.err so that result can easily be obtained via redirecting stdio, while debug/trace/error log via redirecting stderr
simplify