The `cancelTimeoutTaskIfAny()` may make the current thread dead with its interruption. Move `cancelTimeoutTaskIfAny()` into `finally` block after the target logic is performed.