Wrap any exit calls