All files in the assets folder are read-only and you won't be able to write to that folder.
Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.
AppendToFile(text text, text fileName)
SaveFile(text text, text fileName)