Bugfixes for logging

Change-Id: Icab70e4ed84f12f178c9212d50965f87438f1143