Fix missing writeOutput