Add capability to email only when errors occur.