Add check for internet connection