Thanks guys for your replies!
CrossRoads:
move the
pinMode(ledPin,OUTPUT);
farther up in setup.
I made this change and moved the pinMode() up and it seems that this was the problem. It
seems to boot everytime until now.
Just for knowledge purposes: why should one make all pinModes() first before doing other
setup stuff?
Thanks!