fixe fs.write bad argument