Logging plugin fix log corruption