To: Irpack
Here is how I fix this same issue I had. The reason it shows error message because adb looses connection with your phone at that step. If you open device manager when you get message, you should see under 'other devices' Nexus 5 with exclamation mark. Leave the phone at this stage...