Added email notifications for significant script failures.