move connectivity check earlier