Improves HtmlFormat to support custom extension for template files