The saveFile action saves the changes that were made as a result of a record operation.
For example, you can write an event-to-script connection that checks to see if fileIsChanged is true. If it is true, then call this script to save your changes.