It sounds like a draft issue that disturbs the pilot flame when the doors are closed. Or it could be that the flu/chimney is closed and chokes out the flame when the door is closed.
First check that the chimney is open and clear. If it is, then light the pilot only and observe the pilot flame as you close the doors. If you can see the pilot with the doors closed, then observe if the pilot flame starts "dancing" around like it is getting blown on. If so, you could try adjusting the ignition sensor closer to the flame or at least in the direction that the flame tends to go when the doors are closed.
Check if there is a fresh air intake adjustment on the unit and try different settings.
Also, there have been times when I had to actually put a ceramic or steel cover over the pilot flame/sensor to keep drafts from blowing it out when it was running.