code: function updateExistingFile(db, fileName, fileReadStream, options, cb) {
    defaultLogger.debug("In updateExistingFile");
  
    getFileDetails(db, {"groupId": options.groupId}, {}, function(err, fileInfo) {
      if (err) {
        defaultLogger.error(err); return cb(err);
      }
      var latestFileVersion = fileInfo.metadata.version;
      incrementFileVersion(latestFileVersion, function(newFileVersion) {
        if (!newFileVersion) {
          return cb(new Error("File version was not incremented for file " + fileName));
        }
        defaultLogger.debug("New File Version ", newFileVersion);
        createFileWithVersion(db, fileName, fileReadStream, newFileVersion, options, cb);
      });
    });
  }
docs: Updating an existing file means that the new file is saved with the same name with an incremented version.