

All it does is provide a loop that if the specified USB programming device is not found on the USB, it waits a few milliseconds and looks again. If you read the links I posted above you can see the actual fix. The fix is just a couple of lines of code. The real solution is to actually fix it in avrdude:

This will also slightly speed up the operation. I recommend doing this even if avrdude is fixed as there is no reason to do two back to back avrdude commands when it can all be done in a single command. This is the solution that optiboot switched to for its makefiles and build scripts. This is a preferred work around since it avoids the back to back avrdude command issue since it does everything in a single command.

"C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avrdude" -C"C:\Program Files (x86)\Arduino/hardware/tools/avr/etc/nf" -v -patmega328p -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m I turned on verbose mode as you said and copied the two instructions:
