Problems using a switch on digital pin 0 (without serial monitor)

What could be the reason for the error?

The problem is that pin 0 has external on-board wiring to the on-board USB serial converter and even when not using any serial communications or not even wired to the PCs USB, pin 0 has effectivly a 1k ohm pull up resistor wired to the pin. Adding external pull-down resistor just creates a voltage divider situation and will result in not the proper voltage levels to be seen by the input pin. So to use pin 0 as a switch input you should just be able to wire the switch from ground to the input pin. When switch is pushed your digitalRead() will return a zero and a one when not pushed. Try it and see if that doesn't work better for you.

Lefty