Updates script to truncate files when shorter substitutions are made