edits to saveOutput