Costs warning to solicitors over terminating retainers