Removed DirectoryComparator and added external locking