add error handler to send email to some address