avoid any potential duplicate line when modifying auto.osg and auto.master
by adding a check