The plaintiff may, within 30 days after the return of such bond, except to the sufficiency thereof, reasonable notice of such exception having been given to the sheriff or other officer who took the same, and if, upon hearing, the court shall adjudge such security insufficient, such sheriff shall be subject to the same judgment and recovery and have the same liberty of defense as if the sheriff had been made defendant in the attachment, unless good and sufficient security shall be given within such time as may be directed by the court, and enforcement may be had thereupon as in other cases of judgment for the payment of money. Whenever the judgment of the plaintiff, or any part thereof shall be paid or satisfied by any such sheriff, he or she shall have the same remedy against the defendant for the amount so paid by him or her as is now provided by law for bail against their principal where a judgment is paid or satisfied by them.
735 ILCS 5/4-122