Flush stdout for logging through tee