Added support for template files.