Split up setOutput.
Remove debug prints.