outputting markdown to file