code: async function getDataFile(filePath) {
    ensureFileExists(filePath);
    const fileInfo = path.parse(filePath);
    try {
      switch (fileInfo.ext) {
        case '.json':
          const fileContents = await readFile(filePath, 'utf8');
          return JSON.parse(fileContents);
          break;
        case '.yml':
        case '.yaml':
          return await readYamlFile(filePath);
          break;
      }
    } catch (err) {
      log.errorAndExit('Could not getDataFile', err);
    }
  }
docs: Read a JSON/Yaml data file
  @param {string} filePath
  @returns {Promise<object>} - data from file