Periodically checks internet connection and logs result to file