Make threads non-daemon.
Logfile and loglevel added