Save keys to text file