checks for internet connectivity before trying to update