All bonds required or permitted by law to be given in actions or proceedings in any court shall be filed in such court, unless especially required by law to be filed, delivered, or deposited elsewhere, or unless the judge or justice of such court shall, by written order, direct some other disposition thereof.