Added debug to sockets