title: How to append text to a file on a new line
body: <p>Why does the following Groovy code not append the "<strong>hello again</strong>" on a new line?</p>
  
  <pre><code>f = new File('myfile.txt')
  f.append('hello again!\n')
  </code></pre>
  
  <p>This adds to <strong>myfile.txt</strong> after the last line but not on a new line. How do I append the text on a new line?</p>