Tensile strain induced switching of magnetic states in NbSe2 and NbS2 single layers.