add javascript interface to call java functions and a catch for console logs