%{
+#include <errno.h>
#include <string.h>
#include <tlog.h>
#include <tmalloc.h>
FILE *in = fopen(filename, "r");
int err;
- if ( in == NULL )
+ if ( in == NULL ) {
+ tlog(TL_CRIT,"Can not open template file '%s': %s",
+ filename, strerror(errno));
return 3;
+ }
curTmpl = tmpl;
curTmpl->tree = NULL;