xsp: use "die" function, to simplify