in reply to Pattern not manipulating file output

Several issues: