flush working DiskWriter class made to call in flush() hook added in constructor