Rework logging implementation as old way caused issues when running with...

...in mkcloud