Copy input file to output file before patching