Writing to file

Code is now able to modify one item and write a new triggers file.
Goodnight.