fixed bug in create_data_dir