Added some more sys.os.flush() calls to flush "print" statements to stdout