system.tag.writeToTag

This should be working, are you sure your tag path is correct? Are there any errors in the wrapper.log?