add hFlushAll, flushes both read and write buffers