The lien shall cease at the end of one hundred twenty days after doing the last of such work, or furnishing the last item of such skill, services, material, or machinery, unless within such period a statement of the claim therefor be filed with the register of deeds of the county in which the improved premises are situated, or of the county to which such county is attached for judicial purposes, or if the claim be under the provisions of subdivision 44-9-1(2), with the secretary of state.
SDCL 44-9-15