Added support for .tpl files