fix to start thread with UtilThread#start()
fix to stop thread with UtilThread#stop()
implement main thread loop
refactor mutex lock & unlock
refactor flag update sequence