Use console for unhandled errors instead of alert