Check the updated capx.
This shows you how to add a comma and a new line.
If you want to remove the last sprite name from the list you could copy the global variable to a temp variable, add the next sprite name, then if you need to remove the last name just copy the temp back to the global variable. Essentially make sure the temp variable is always one name behind the global variable.