improve error handling for _check_cname