No bond filed with the secretary of state shall be removed except upon the written order of a judge of a court of record before whom an action is pending to enforce the conditions thereof.