Added small error check for Socket.io server availability