Adding lastError template