public static synchronized void endProfiling(final String reportPath) throws IOException {
    if (reportPath == null)
      throw new NullPointerException("reportPath must not be null");
    if (reportPath.length() == 0)
      throw new IllegalArgumentException("reportPath must not be an empty string");
    
    subLCommandProfiling = false;
    if (subLCommandProfiler == null) {
      Logger.getLogger("org.opencyc.api.DefaultSubLWorker").log(Level.INFO, "SubL command profiling is not active.");
      return;
    }
    
    Logger.getLogger("org.opencyc.api.DefaultSubLWorker").log(Level.INFO, "End of SubL command profiling, writing report to " + reportPath);
    ((SubLCommandProfiler) subLCommandProfiler).report(reportPath);
    subLCommandProfiler = null;
  }