 James 1 verse 17 had not yet been written, but the truth of that scripture was as applicable in the Old Testament as it was when James wrote it in the New Testament. To him who knows to do good and does not do it, to him it is sin. To obey the word of God is good. To not obey the word of God is sin.