Logging plugin fix log corruption

The corruption used to happen if the user pressed connect and then cancelled during an already ongoing logging replay.