code: function isExistingFile(filename) {
      try {
          return fs.statSync(filename).isFile();
      } catch (err) {
          if (err.code === "ENOENT") {
              return false;
          }
          throw err;
      }
  }
docs: Checks whether the given filename points to a file
  @param {string} filename A path to a file
  @returns {boolean} `true` if a file exists at the given location