Extend the class to check internet connection.