Added better error message when the socket connect fails