add fs.writeFile and auto mkdir