§ 552. Liability of county for loss of court and trust funds. Each county shall be responsible for all property or moneys deposited with the county treasurer of the county by virtue of any judgment, decree or order of a court of record in this state provided, however, that no county shall be held liable for any loss due to the depreciated value of an investment legal at the time of its purchase and which continued to be a legal investment during the period of the trust. An action to recover any loss to or of such fund may be brought against the county by any party aggrieved or by the state comptroller in a court of competent jurisdiction.