Script now checks if Internet connection is available a couple of times