Use Kernel::at_exit instead of a separate watcher