Added debug messages for socket events