Added logging socket error