@Sure
There is a fundamental problem with your line of thinking that indicate you probably do not understand the purpose and the reasons of paying dividence and why corporation borrow money.
First someone up there clearly stated that it is actually cheaper to borrow in most cases and as long as a company has not exceeded the optimum capital structure the marginal benefit of borrowing increase upto that optimum point so in most cases it is genious to borrow.
Secondly dividend payment is a policy, regardless of the profit a company make, companies that pay it always pay it, the consequence of stopping dividend payment is devastating to the company.
Thirdly what you see everyday in earning release is not the actual earnings so do not be fooled by that, corporation always keep reserves some upto 20% of the earning they release, basically every level of reporting/ consolidation, keep and release reserves when appropriate.