Deuteronomy 4:30

4:30 In your distress when all these things happen to you in the latter days, if you return to the Lord your God and obey him

Deuteronomy 31:29

31:29 For I know that after I die you will totally corrupt yourselves and turn away from the path I have commanded you to walk. Disaster will confront you in the days to come because you will act wickedly before the Lord, inciting him to anger because of your actions.”