Deploy: added sending email on fail.