Similarity Distribution

Added a function to write the similarity distribution to a file