replace asyncPlatformFlush with flush

replace `asyncPlatformFlush()` with newer version `flush()`