add support for templates in file download path