fixed log levels, code cleanups and restore the thread interruption states.