add error message when socket.gethostbyadder() failed