Sec. 3. Provided that whenever, during the course of the action, the judge or magistrate in whose court such action is pending finds that the bond is defective, excessive or insufficient in amount, or that the sureties, if any, are not acceptable, or for any other good and sufficient cause, such judge or magistrate may, either in term-time or in vacation, order the accused to be rearrested, and require the accused to give another bond in such amount as the judge or magistrate may deem proper. When such bond is so given and approved, the defendant shall be released from custody.