better template error reports