fix flush_data() data_path check, get rid of can_persist() helper