Deuteronomy 31:21-25 New King James Version (NKJV)

21. Then it shall be, when many evils and troubles have come upon them, that this song will testify against them as a witness; for it will not be forgotten in the mouths of their descendants, for I know the inclination of their behavior today, even before I have brought them to the land of which I swore to give them.”

22. Therefore Moses wrote this song the same day, and taught it to the children of Israel.

23. Then He inaugurated Joshua the son of Nun, and said, “Be strong and of good courage; for you shall bring the children of Israel into the land of which I swore to them, and I will be with you.”

24. So it was, when Moses had completed writing the words of this law in a book, when they were finished,

25. that Moses commanded the Levites, who bore the ark of the covenant of the Lord, saying:

Deuteronomy 31