Write log file into markdown directory.

output_directory does not exist yet. Work in progress...