code: function read(filePath, mode, callback) {
    // Read a file using the module 'fs'.
    const readFile = (encoding, cb) => {
      fs.readFile(filePath, encoding, (error, data) => {
        if (error) {
          console.error(`${filePath}: Could not read the file`);
        }
  
        async.nextTick(cb, error, data);
      });
    };
  
    // Parse a JSON file data.
    const parseJSON = (data, cb) => {
      try {
        const parsedData = JSON.parse(data);
        async.nextTick(cb, null, parsedData);
      } catch (error) {
        console.error(`${filePath}: Could not parse the JSON data`);
        async.nextTick(cb, error);
      }
    };
  
    if (mode === ReadMode.UTF8) {
      readFile('utf8', (error, data) => {
        async.nextTick(callback, error, data);
      });
    } else if (mode === ReadMode.BUFFER) {
      readFile(null, (error, data) => {
        async.nextTick(callback, error, data);
      });
    } else if (mode === ReadMode.JSON) {
      async.waterfall([
        cb => readFile(null, cb),
        (data, cb) => parseJSON(data, cb),
      ], (error, result) => {
        async.nextTick(callback, error, result);
      });
    } else if (mode === ReadMode.MODULE) {
      try {
        const data = require(filePath);
        async.nextTick(callback, null, data);
      } catch (error) {
        console.error(`${filePath}: Could not require the module`);
        async.nextTick(callback, error);
      }
    } else if (mode === ReadMode.STREAM) {
      try {
        const data = fs.createReadStream(filePath);
        async.nextTick(callback, null, data);
      } catch (error) {
        console.error(`${filePath}: Could not create the read stream`);
        async.nextTick(callback, error);
      }
    }
  }
docs: Read a file.