added email sending on error for action_perform methods