fixed writeFile, please check
Merge pull request #1 from shz117/master

fixed writeFile, please check