fix the problem that no stop in print a dir's content