Opening 30K+ files is not a problem.
I was hoping for some hidden mechanism to better control the output buffering - however your idea of manually controlling it is not a bad one.
I heard that when writing "\n" to an output stream it forces a flush?
Can anybody confirm this?