remove duplicate error log in template