code: protected void setFile(boolean append) throws IOException {
  	synchronized (sync) {
  	    LogLog.debug("setFile called: " + res + ", " + append);
  
  	    // It does not make sense to have immediate flush and bufferedIO.
  	    if (bufferedIO) {
  		setImmediateFlush(false);
  	    }
  
  	    reset();
  	    Resource parent = res.getParentResource();
  	    if (!parent.exists()) parent.createDirectory(true);
  	    boolean writeHeader = !append || res.length() == 0;// this must happen before we open the stream
  	    Writer fw = createWriter(new RetireOutputStream(res, append, timeout, listener));
  	    if (bufferedIO) {
  		fw = new BufferedWriter(fw, bufferSize);
  	    }
  	    this.setQWForFiles(fw);
  	    if (writeHeader) writeHeader();
  	    LogLog.debug("setFile ended");
  	}
      }
docs: <p>
  Sets and <i>opens</i> the file where the log output will go. The specified file must be writable.
  
  <p>
  If there was already an opened file, then the previous file is closed first.
  
  <p>
  <b>Do not use this method directly. To configure a FileAppender or one of its subclasses, set its
  properties one by one and then call activateOptions.</b>
  
  @param fileName The path to the log file.
  @param append If true will append to fileName. Otherwise will truncate fileName.