@Dave Foster Can you weigh in here?
@Josiah Collins , Costs of the sale can be paid with proceeds but must be on the settlement statement as costs of the sale. You cannot receive the funds as a reimbursement or they will be taxable to you.
Regarding offset losses, the IRS really doesn't care too much how much profit or loss you have on a property. If you want to do a 1031 exchange and defer all tax you must do two things. First you must purchase at least as much as you sell. And second you must use all of the proceeds in the purchase.
If you take cash out the irs perceives it as taking profit even though you think of it as replacing losses. So if you take cash out either at sale or purchase you will pay tax on that amount. But if you're willing to do that it doesn't disqualify your exchange.