docs: private List<File> findNValidSnapshots(int n) throws IOException {
          List<File> files = Util.sortDataDir(snapDir.listFiles(),"snapshot", false);
          int count = 0;
          List<File> list = new ArrayList<File>();
          for (File f : files) {
              // we should catch the exceptions
              // from the valid snapshot and continue
              // until we find a valid one
              try {
                  if (Util.isValidSnapshot(f)) {
                      list.add(f);
                      count++;
                      if (count == n) {
                          break;
                      }
                  }
              } catch (IOException e) {
                  LOG.info("invalid snapshot " + f, e);
              }
          }
          return list;
      }