Print an error when a connection fails

The clear intent of this halfway-modified code was to print a warning.
Merge pull request #306 from scj7t4/trivial/ConnectionError

Print an error when a connection fails