if (currFile != null) currFile.registerConsumer(consumer);
synchronized (this) { if (currFile != null) currFile.registerConsumer(consumer); }
  public void registerConsumer(Consumer consumer) {    synchronized (consumers) {      consumers.add(consumer);    }    if (currFile != null)      currFile.registerConsumer(consumer);  }