WebAgg: flush stdout after printing

Without flushing, the message can be displayed too late