Why does use of Serial.print cause sketch to restart