fix warn when dir tmpl is empty