ensure debug io is in the right place flow-wise