public boolean isEmpty() throws IOException {
    if (!Files.exists(file)) {
      return true;
    }

    try {
      loadHeader();
    }
    catch(VersionMismatchException | EOFException ex) {
      Files.deleteIfExists(file);
      myIndexPath.delete();
      return true;
    }

    return false;
  }
public boolean isEmpty()