simplify writeFileSync