Added cordova checks to allow local testing