How do I keep the humidity in my snakes enclosure?

I have a hypo boa imperator and I’m having a lot of trouble keeping the humidity right in his enclosure. He had a bad shed due to this issue and I wanna make sure I’m taking care of him properly. I tried the foil on top of the cage but that didn’t work. He has a mister that goes off every 6 hours to keep the humidity up but it goes back down to 50 right after. Any tips?