-temp files are written inside a temp folder to allow for more sane names
-a little more cleanup