If the general sessions judge finds the issue in favor of the defendant, or the plaintiff dismisses or fails to prosecute the suit, the judge shall render judgment against the plaintiff and the plantiff's sureties on the replevin bond that the property replevied be returned to the defendant, or on failure to do so, that the defendant recover of plaintiff and sureties on replevin bond the value of the property replevied with interest thereon and damages for the detention of the same, the value of the property and the damage to be assessed by the judge trying the case.