Implemented async flush