Internet Connection Check

Added checking to check if the pc is connected to the internet before it
tries to retrieve anything.