This article develops a new risk management framework for companies based on the leverage process (a ratio of company asset value over its debt). We approach this task by time reversal, last passage time, and h-transform of linear diffusions. For general diffusions with killing, we obtain the probability density of the last passage time to a certain alarming level, and analyze the distribution of the time left until killing after the last passage time to that level. We then apply these results to the leverage process of the company. Finally, we suggest how a company should determine the aforementioned alarming level. More specifically, we construct a relevant optimization problem and derive an optimal alarming level as its solution.