add a function to check the internet connection before opening ex web or videos