fix: register exception handler also for cli