@Override
  public void dispose() {
    try {
      fileAdapter.closeFile();  // TODO close file in background?
    }
    catch (IOException e) {
      logger.warn(e);
    }
  }
@Override
  public void dispose()