Used sys.stdout instead of local_output in one place