copy example code to text file