added network reachability check