Fix file modification check and clean up markdown