More if-stuff, more logfiles
make the dir-creation less uglier
Minimal changes