Obstacle Avoidance

It is quite likely this is the result of a buffering or caching operation on the I/O stream. Can you set parameters for things like buffer size or timeouts when you open the strean, or you have access to a “flush” command to force the system to empty the buffer?