add error handling as per @brianloveswords recommendation to deal w/ bad failure in case DNS is down