You may have a voltage drop problem, either within the track itself being loose in places or with the power source. It doesn't take much power to light up the headlight, it'll come on before the motor moves in many cases. So the headlight might only say that something is there, not how good it is. Get a multimeter somewhere and get a reading on your track. My DCC system delivers between 13 and 14 Volts, apparently some others vary somewhat.