better connection error check on startup