cleanup temp home folder at shutdown and logs at startup