I have a ten year old gas water heater, a State Select 40 gallon PR640NOVT. I use it to heat my workshop. So it was turned off for the summer. When I turned it on and lit the pilot a few weeks ago it ran fine at first but the next day when I was in the shop I noticed it was trying to fire up but couldn't. The power vent would come on for a couple of seconds but the burner didn't light and it shut down. Then it would try to fire up again... Repeat. So I turned it off but a week later turned it on and it fired right up. Later I noticed it wasn't firing up again. I guess it is some kind of safety switch malfunctioning, what do you think? The pilot stays lit, what should I check/replace first?