added network connectivity check