closedir when succeed