When having two successive createFile() functions, clicking on the first "Copy to Editor" button will correctly create the desired file. However, when clicking on the second "Copy to Editor" button, the content of the new file will simply be appended into the previously created file. The desired behavior would be that a new file is created as specified in the createFile() function.
This issue can be reproduced by working through step 1 in this scenario.