You just need to initialize the pin to "Idle Level" at the start of the program.
Add a ... HIGH D_Out ... statement before the ... PAUSE 500.

You don't really need that much pause time for the initialization, but it's already in the program so you might as well use it.