Why not use `@onExit` for this? It's already in the project.