move error email after the rollback