nexus 5 d820 problem

i have a problem with this nexus 5 it shows stopped working on start and then restarts, i can enter bootloader and download mode but i can not get to the point to enable debug mode. If i try to unlock bootloader it says that its done but on the phone stays as locked.

Any ideas?