exit gracefully if host cannot be resolved. Fixes #488