code: @Handler
      @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
      public void onSaveInput(SaveInput event) throws InterruptedException {
          if (!Arrays.asList(event.options())
              .contains(StandardOpenOption.WRITE)) {
              throw new IllegalArgumentException(
                  "File must be opened for writing.");
          }
          for (IOSubchannel channel : event.channels(IOSubchannel.class)) {
              if (inputWriters.containsKey(channel)) {
                  channel.respond(new IOError(event,
                      new IllegalStateException("File is already open.")));
              } else {
                  new Writer(event, channel);
              }
          }
      }
docs: Opens a file for writing using the properties of the event. All data from
  subsequent {@link Input} events is written to the file.
  The end of record flag is ignored.
  
  @param event the event
  @throws InterruptedException if the execution was interrupted