Move out template rendering from fs writer