fixed dir deletion issue