Logging - bugfix and debug prings