In the event it is made to appear to the court or jury trying the cause that the action of the policyholder in bringing the suit was not in good faith, and recovery under the policy is not had, the policyholder shall be liable to the insurance company, corporation, firm, or person in a sum not exceeding twenty-five percent (25%) of the amount of the loss claimed under the policy; provided, that the liability, within the limits prescribed, shall, in the discretion of the court or jury trying the cause, be measured by the additional expense, loss, or injury inflicted upon the defendant by reason of the suit.