enhanced to clean empty folder.