Flush stdout while loading modules