Debt sustainability and credit booms