Enhancement

1. logger
2. refactor
3. Fix daemon thread problem.
This could be
```python
with self.RuntimeError(RuntimeError):
    pass
```