(a) In an action on an attachment bond, the plaintiff therein may recover, if he shows that the attachment was wrongfully sued out, the actual damages sustained and reasonable attorney’s fees, of not more than $25 in any case, to be fixed by the court; and if it is shown that such attachment was sued out maliciously, he may recover exemplary damages.

(b) No action may be maintained on a bond until after final judgment in the main action unless the same is discontinued or dismissed.