Bugfix:
Reversed resistor and ground pins.
Read LED state before entering loop.