Slight refactor of dns check

Let's me know WHICH error failed, as well as de-duplicating logic.