add recovery template detection