Fixed Issue 32. Check network connectivity before querying.