small changes to text file creation