Moved debugOutput handle to monad state