dirname changed, part2 updated for Markdown