Exceptions do not show stracktrace in console. Added use of console.assert(..) instead.