Do not open files unbuffered, since the buffers are flushed after each write and
Python3 does not allow you to open text files with no buffer (only raw binary
files can be opened that way).