integrate error output in templates