Reordered settings
Added option to log to tmpfile