adding message catch for Socket.error