Be sure to pull the plug and test the old thermostats with a suitable meter first.
Stats can fail due to age, blocked condensor or switching the dryer off mid cycle to check on the clothes. You should always allow it to do the ten minute cool down at the end.