debugging socket error