Added method to check for internet status.