semi-working cordova environment checking