md file rewrite