fix logger stuff, check if thread isalive

Remove toString()s in logger, changed to message template, check if thread is alive before waiting for it to die