fastboot flash = FAILED (remote: invalid bootloader image) After breaking CyanogenMod on my Nexus 5 I want to flash it with a factory image but all I get is:

fastboot flash bootloader bootloader-flounder-3.43.0.0114.img
sending 'bootloader' (2970 KB)...
OKAY [  0.270s]
writing 'bootloader'...
FAILED (remote: invalid bootloader image
)
finished. total time: 0.450s


The same happens when I do fastboot flash boot boot.img with FAILED (remote: image is not a boot image) etc.

What could be the problem?
It looks like you've got the wrong factory image. You're trying to flash the bootloader for flounder (which I believe is for the Nexus 9). You need to download a Nexus 5 factory image which should contain a bootloader called bootloader-hammerhead-hhz12d.img (or similar)