If it appears that the beasts were lawfully impounded, the defendant shall have judgment for any sum as shall be found due from the plaintiff for the damages for which the beasts were impounded, together with all the legal fees, costs, charges, and expenses and the costs of the action of replevin, or instead of this judgment the court may, in its discretion, enter judgment for a return of the beasts to the defendant, to be held by him or her irrepleviable by the plaintiff and for defendant's damage for the taking by the replevin and for his or her costs of suit. In case the plaintiff in replevin shall not enter his or her suit in replevin, the defendant may file his or her complaint before the court and have judgment against the plaintiff as provided.
R.I. Gen. Laws § 4-14-13