Support for sync mode
WIP on flush method