code: function writeFile(filename, data) {
      return new Promise(function (fulfill, reject) {
          fs.writeFile(filename, data, function (err, res) {
              return err ? reject(err) : fulfill(res);
          });
      });
  }
docs: Write the string data to file.
  Asynchronous mode
  @param {string} filename
  @param {string} data
  @returns {promise}