[improvement] cancel the timer to avoid waiting for the timer callback while exiting
[improvement] enhance debug log