file templating based on extension and path