fix bug: fileWrite result