@Jeffers you first need to get the first change to the template is to insert your correct factory code
2) Set Factory Code
From the PuTTy output you posted, the generated error appears to be 0xb24d4040, so you would change line 33 of the template to factory_code = 0x40400001