When I run a hazard calculation demo, for example, I see that `atexit.register` is called 5 times. That means `flush` is called 5 times on exit, right?