Wrote function to get frequencies from a file into a list