Added function fo writing data structures to file; added the abiliy to use own function to generate key in indexing biosequence file