Modified set command, created mayFail and ifElement.