Add Js Error handler, Update logger