private static void verify(boolean ok, String msg) {
    if (!ok) {
      Throwable e = new Throwable();
      System.out.println("Verification failed:" + msg);
      e.printStackTrace();
      System.exit(1);
    }
  }