code: @Handler
      public void onClose(Close event, Channel channel)
              throws InterruptedException {
          Writer writer = inputWriters.get(channel);
          if (writer != null) {
              writer.close(event);
          }
          writer = outputWriters.get(channel);
          if (writer != null) {
              writer.close(event);
          }
      }
docs: Handle close by closing the file associated with the channel.
  
  @param event the event
  @param channel the channel
  @throws InterruptedException the interrupted exception