fixed typo
hostname error checking