Bug fix: test error condition as soon as we have an error.
Test earlier whether the host:port is available.

This makes it cheaper to setup Shenmeci as a crontab job.