Log an error when setting template error