Added support for custom template files