core: check for data_dir [GH-3208]