Added $stdout.flush to use safely with tee