Improved warnings on failure to connect

Adding a warning (with the error message) when can't connect to a host.
And adding the host name into the error message when failed.

Closes #91
abi additions and small cleanup