.directory() seems to work fine after changing templating strategy;