Catch invalid hostnames before they bleed through in stderr output