answer:Require that they either meet some tests for reliability, or that they pay in advance. Look at each client that didn’t pay you, and see what the danger signs might have been that you could have detected before they defaulted. Make that a condition that requires advance payment in future. If some clients don’t like that, explain to them the reasons based on actual past history of not getting paid, and offer them a contract that binds you to actually complete the work as specified, or else you forfeit part of the payment back.