More bug fixes for logging feature