fix a bug in md_file_generator