Command handler + begin to fix ThreadKeepAlive