added console.log for unhandled exceptions