Added option to customize template name based on template paths