docs: private void setStreamFromFile(File targetLogFile, boolean closeExisting, long startOffset, boolean showError) {
          long realMaxFileSizeBytes = maxFileSizeBytes;
  
          // Store the value, and temporarily "disable" log rolling to avoid
          // re-trying to roll the log if the ThreadIdentityManager creates
          // log or trace records. This value is reset in the finally block
          maxFileSizeBytes = 0;
  
          Object token = ThreadIdentityManager.runAsServer();
          try {
              if (closeExisting) {
                  // Close the existing file
                  currentPrintStream.flush();
                  if (currentFileStream != null) {
                      LoggingFileUtils.tryToClose(currentFileStream);
                  }
              }
  
              if (targetLogFile == null) {
                  // Create the non-unique file (e.g. trace.log)
                  targetLogFile = LoggingFileUtils.createNewFile(fileLogSet, showError);
              }
  
              if (targetLogFile != null) {
                  FileOutputStream newFileStream = null;
                  CountingOutputStream newCountingStream = null;
                  PrintStream newPrintStream = null;
                  try {
                      // create the new file stream -- never append
                      // When asking Erin about the above comment, she could not find a reason for why we would
                      // never use the append flag.  Testing across numerous platforms has shown that using the
                      // append flag does not appear to cause any problems with log creation and log rolling - a
                      // switch to using append = true is being made to address APAR PI57488
                      TextFileOutputStreamFactory fileStreamFactory = TrConfigurator.getFileOutputStreamFactory();
                      newFileStream = fileStreamFactory.createOutputStream(targetLogFile, true);
                      newCountingStream = new CountingOutputStream(newFileStream, startOffset);
                      newPrintStream = new PrintStream(newCountingStream);
                  } catch (IOException e) {
                      // should not happen: we created the new file in createNewFile
                  }
  
                  // If both the file and print streams were created successfully,
                  // re-assign the active/current streams to point to the new
                  // artifacts
                  if (newFileStream != null && newCountingStream != null && newPrintStream != null) {
                      if (logHeader != null) {
                          logHeader.print(newPrintStream);
                      }
  
                      // re-assign the current file and print streams
                      setStreamStatus(StreamStatus.ACTIVE, newFileStream, newCountingStream, newPrintStream);
                  } else {
                      // something didn't go right along the way...
                      // don't keep spinning trying to create files when you can't
                      setStreamStatus(StreamStatus.CLOSED, null, null, DummyOutputStream.psInstance);
                  }
              } else {
                  // something didn't go right along the way...
                  // don't keep spinning trying to create files when you can't
                  setStreamStatus(StreamStatus.CLOSED, null, null, DummyOutputStream.psInstance);
              }
          } finally {
              ThreadIdentityManager.reset(token);
              maxFileSizeBytes = realMaxFileSizeBytes;
          }
      }