code: function writeFileSync(cvs, data) {
      if (typeof data.path !== 'string') {
        throw new TypeError('Invalid path type: ' + typeof data.path);
      }
  
      var buff = cvs.toBuffer();
      var fd = fs.openSync(data.path, 'w', WRITE_MODE);
  
      try {
        fs.writeSync(fd, buff, 0, buff.length, 0);
      } catch (error) {
        fs.closeSync(fd);
      }
    }
docs: Write the data of the rendered canvas to a given file path.