more elegant handling of UnknownHostException