Check internet connection before processing