title: Thumbnailator how to write resulting thumbnail to a separate folder
body: <p>I am using thumbnailator java lib to generate thumbnails of uploaded images with this one line of code</p>
  
  <pre><code>Thumbnails.of(bigFileName+fileExtn)
      .size(160, 160)
      .toFile(new File(newFolderName + thumbnailFileName + fileExtn));
  </code></pre>
  
  <p>I get a <code>FileNotFoundException</code> just before it creates a new file. </p>
  
  <p>but when I save the file to thumbs folder and then overwrite it with the thumbnail file it works. how can I write the thumbnail to a directory where it does not exist already?</p>