Added email notification of errors