added exception handling when host is down