avrdude programmer is not responding help please

Hi folks,

I using a Macbook Air (El Capitan v10.11.3). I currently have installed the Arduino IDE v1.6.9. I'm using the Arduino Uno.

There are times where I get the following error message (see attachment).

Everything under tools is set like its supposed to be. Port is all good, board, and programmer. Sometimes I can upload a sketch once and then when I try to upload again it does not and get the message. I then disconnect it from my Mac and reconnect it and it works fine (able to upload as many times and the message doesn't appear).

My Arduino is connected to a Neopixel via the 5v, ground (right next to it), and pin 8. It seems that when pin 8 is disconnected and reconnected and then I try to upload code then this message occurs, still I don't know what I'm doing wrong or what.

So my question is why is this happening and how could I fix this? I'm a newbie so I really don't know what's going on and if this is a bootloader problem like I've read somewhere (I hope not 'cause I wouldn't know how to fix that).