Improve mobile template file detection