catch js exceptions on boot