added directory cleaning