Avoid demo fail by wrapping gethostbyname in try/catch