added error handling for bad host names