Checking internet connection if user touches capture button