Add setup and exit hooks for list-text