The memory of your vile deeds can haunt you when once thought. Guilt, fright and regret will swarm one’s mind.
Those thoughts may be remembered in the deathbed, causing greater discomfort. Best to not do vile deeds in order to depart this birth mindfully and peacefully. Bad deeds haunt you. Good deeds cherish you.