I think there's probably a more robust place to put this; possibly by observing one of the observables? Don't we have an observable that indicates whether the app is running?

A case I'm thinking of is a main() that exits by itself without being killed.