Maybe it would be better to print an error and exit early if one of the hostnames can't be resolved?
Maybe it would be better to print an error and exit early if one of the hostnames can't be resolved?