added append to text files writing