If you continue to practice until you die, you don’t have to worry about going to a woeful state at the time of death because awareness will continue to do its job then.
Now you are training the mind to make awareness become a habit – every time defilement comes, the mind tries to be aware. Later, naturally, when defilement comes at the time of death, awareness also arises.
Don’t worry; just continue to practice.
If your awareness becomes automatic, becomes a habit, then you can be assured of a good rebirth because awareness will do its job at the time of death. (Q&A 14 (9:17-10:05)