Add -S to append script to file
Preserve invocation for script output
Save invocation into variable

Reduces verbosity when saving a script with a complicated invocation