You have some husbandry issues which can be causing the Dragon the problems you are seeing. The Walnut shell can serious issues which includes Perforation of the intestines, a Blockage, corneal ulcers and skin problems Graphic: http://mrskingsbioweb.com/beardeddragngrossanatomy.htm
I suggest using a solid substrate like tile, cage carpet, slate or paper. Sand can also cause skin problems and corneal ulcers in the eyes.
The basking area should have 110*-115*F and the cool side of the tank in the 85* range. This is important for digestion and passing of stool. If the temps are not correct, this can also cause a problem.
You need to have a day time basking bulb as well as a UVB. I recommend a reptisun 10.0 and UVB lights do not put out heat. The UVB bulb is needed to stop Metabolic Bone Disease. The UVB needs to be changed every 6 months.
The UVB should be a tube type. I suspect you are not using a UVB as UVB are different than UVB bulbs. Many bulbs are sold as UVB but do not have the output needed to metabolize calcium: http://www.anapsid.org/uvtable.html
Coil UVB bulbs can injure the eyes.
Compact UVB problems: http://www.uvguide.co.uk/phototherapyphosphor-info.htm
The UVB bulb should not have any plastic between it and the Dragon, it needs to run the length of the tank and be no more than 12" from the Dragon. Both lights should run daily for 12-14 hours a day during spring and summer and fall and winter needs to go to 6-8 hour cycle.
You should be feeding Collard greens, mustard greens, dandelion greens, escarole and curly endives. Butternut squash and various berries are great for a treat. The Veggies should be put in fresh daily, and done about an hour after lights on. They need 80% veggies daily and 20% live prey for your Dragon over a year.
The live prey should include crickets, silk worms, roaches, Goliath worms and phoenix worms. Super worms and wax worms are like giving the Dragon candy. All veggies and prey should be dusted with calcium daily 5 days a week and vitamins 2 days a week.
The reason you see the open mouth under the lamp is that is the way a Dragon thermo regulates the body temperature. It is called Gaping. It allows heat to escape the body. If it was all the time it could be an indication of a respiratory infection. Joan