Here's what jumps out at me ...
and
While the actual command to unlock the bootloader is rather quick, in order to complete the phone must completely reboot/reset following unlocking the bootloader, even if it had been previously unlocked and re-locked.
I also don't see anywhere in your log that the bootloader was re-locked, so if you have to continually run the unlock command, it says to me that you really never unlocked the bootloader in the first place, in which case the subsequent failures when attempting to flash various firmware makes perfect sense.
Since you are flashing hammerhead, I assume you have a Nexus 5, but you didn't mention which version of Android it has now. You'll have to forgive me here because I'm an old fart with a memory like a steel seive, but in one of the later versions of android (I thought it was Marshmallow, but it could have been Lollipop) you need to go into settings to allow the bootloader to be unlocked. Humor me and go to settings>developer options and see if there is an option to allow OEM unlocking and if there make sure it's enabled.
I'd also try unlocking manually rather than using a script or a toolkit. It's very simple. First enable USB debugging and plug your phone into your PC. The first time you do this you should see an RSA prompt like this.
If you saw that already and checked always allow, then you're golden, otherwise check the always allow this time and tap OK. Now power down your phone, press and hold Vol. down, up and power all at the same time until the fastboot menu appears. Then plug in your phone (or if was already plugged into your pc, just set it down).
On your PC (Windows or Linux) or Mac, open a command prompt/terminal window and navigate to where fastboot.exe resides.
Code:
CD C:\users\yourname\Desktop\mini-sdk\sdk-tools\
That's assuming windows, and you are using the mini SDK extracted to your desktop.
Type
just to make sure your phone is being seen by your PC. You will see a serial number. If it's blank then we need to work on that. Assuming you're connected type
and you should see a warning pop up on your phone which you must accept to proceed. It's rather dire, but all it's going to do is factory reset and then reboot with an unlocked bootloader.
Once that completes, then you're good to flash your firmware. Let us know how you make out.