function optimizeFile(config, file, output) {
  return fs.promises.readFile(file, 'utf8').then(
    (data) => processSVGData(config, { path: file }, data, output, file),
    (error) => checkOptimizeFileError(config, file, output, error),
  );
}
Read SVG file and pass to processing.

@param {any} config options
@param {string} file
@param {string} output
@return {Promise<any>}