Added logic for working with synced directories.