fixed bug in print_dir_exp