Why trap on exit? Why not just put `load_hooks` logic inline at the end?