Added internet connection check