checking for offline mode