better hostname error handling
s/hostname/cname/