Fixing bug in logging sockets.