Thread not in daemon in order to avoid premature termination