code: @Handler(priority = -1000)
      public void onStop(Stop event) throws InterruptedException {
          while (!inputWriters.isEmpty()) {
              Writer handler = inputWriters.entrySet().iterator().next()
                  .getValue();
              handler.close(event);
          }
          while (!outputWriters.isEmpty()) {
              Writer handler = outputWriters.entrySet().iterator().next()
                  .getValue();
              handler.close(event);
          }
      }
docs: Handle stop by closing all files.
  
  @param event the event
  @throws InterruptedException the interrupted exception