Adding dissimilarity-threshold setting to compare and changing grep -E to grep -P to be linux compatible.