fix  the bug when recompiling
read file with a buffer