added Wi-fi connection check