order directory structure and delete obsolete files