Adding logging and exception catching
Adding js try/catch block when javascript statements are sent from the Android side to Cordova side.
Defining document events so that they can properly be raised