Output frequency to text file