Handle script errors correctly (log & Notification Center)