flush output to get latest print line