Correctly handle the saveoutput flag.