add cmd wrapper & onthrow handler