fix bug: fs.write