Cordova 3.0
improved error handling