code: private void afterRecord() {
          if (fileNamePattern != null && getRecordCounter() % splitlimit == 0) {
              try {
                  endCollection();
                  writer.close();
                  newWriter(fileNamePattern, fileNameCounter, bufferSize, compress);
                  setupEventConsumer(writer, indent);
                  beginCollection();
              } catch (IOException e) {
                  logger.log(Level.SEVERE, e.getMessage(), e);
              }
          }
      }
docs: Split records if configured.