removed debugger and added one more check for window.cordova