Rolling is not a way to avoid a loss. It closes the losing trade and opens a new one; the loss is realised whether or not the statement shows it that way. What rolling buys is time or a better strike, in exchange for either a debit or additional risk.
The discipline that separates good rolls from bad is simple: roll for a credit, or do not roll. A roll that costs money is usually a new trade you would not have put on independently.
Example: short the XYZ $50 put for $1.30, XYZ falls to $46 and the put trades at $4.60. Rolling out 30 days and down to the $48 strike might close at $4.60 and open at $4.85 — a $0.25 credit, a better strike, and a realised loss of $3.30 on the original.