Changed to a simpler script to check for network connection , closed #2