added some error handling server side for sockets