A person charged with a criminal offense may be released with or without bail in accordance with rule 6.02 of the Rules of Criminal Procedure. Money bail is the property of the accused, whether deposited by that person or by a third person on the accused's behalf. When money bail is accepted by a judge, that judge shall order it to be deposited with the court administrator. The court administrator shall retain it until the final disposition of the case and the final order of the court disposing of the case. Upon release, the amount released must be paid to the accused personally or upon that person's written order. In case of conviction, the judge may order the money bail deposit to be applied to any fine or restitution imposed on the defendant by the court and, if the fine or restitution is less than the deposit, order the balance to be paid to the defendant. Money bail deposited with the court or any officer of it is exempt from garnishment or levy under attachment or execution.