adding flag HAM_FLUSH_WHEN_COMMITTED