In an action on such bond, if it is shown that the attachment was wrongfully sued out, the defendant may recover the actual damages sustained and reasonable attorney's fees to be fixed by the court. If it is shown that such attachment was sued out maliciously, the defendant may recover exemplary damages, and the defendant need not wait until the principal suit is determined before suing on the bond.