Adding error handling for websocket send problems