 	defp write_readme(output, {:ok, content}, modules, config) do
 		content = Autolink.project_doc(content, modules)
 		readme_html = Templates.readme_template(config, content) |> pretty_codeblocks
-		path = "#{output}/README.html"
-		log(path)
-		File.write(path, readme_html)
+		"#{output}/README.html" |> log |> File.write(readme_html)
 		true
 	end
 


	defp generate_module_page(node, modules, output, config) do
		content = Templates.module_page(node, config, modules)
		path = "#{output}/#{node.id}.html"
		log(path)
		File.write(path, content)
	end

	defp log(path) do
		cwd = File.cwd!
		Mix.shell.info [:green, "* creating ", :reset, Path.relative_to(path, cwd)]
	end
end

		Enum.each nodes, &index_list(&1, all, output, config)
		Enum.each nodes, &generate_module_page(&1, all, output, config)
		content = Templates.list_page(scope, nodes, config, has_readme)
		"#{output}/#{scope}_list.html" |> log |> File.write(content)
	end

	defp index_list(%ExDoc.FunctionNode{}=node, module, config) do
