code: private boolean zkPathExists(String path) throws IOException {
      try {
        return zk.exists(path, false) != null;
      } catch (KeeperException e) {
        keeperException("Unrecoverable ZooKeeper error checking if " +
            path + " exists", e);
      } catch (InterruptedException e) {
        interruptedException("Interrupted checking if ZooKeeper path " +
            path + " exists", e);
      }
      return false; // Should never be reached
    }
docs: Check if a path exists in ZooKeeper
  @param path The ZNode path to check
  @return True if path exists, false if otherwise
  @throws IOException If there is an error talking to ZooKeeper