I don't have any error message, PuTTY simply crash as-soon-as I press a key when on-hold at the last line of the script. Please note that I simply copy then paste your script file once in PuTTY (like I did with your fix_160A script file).
Instead of copy and paste the script content directly in Putty terminal, which might be disrupted when the content is not in pure alphanumeric and contains special characters, you can download Winscp to copy over the file using scp method, then change the script to executable mode (chmod +x).