logging: improve the AsyncFileWriter flush test()