Flush stdout when doing log prints