In all cases where process to bring witnesses before the grand jury shall be executed, and the witness shall fail to attend, the clerk shall, on the order of the judge or application of the district attorney or any member of the grand jury, issue an attachment for such witness, returnable immediately, or, if the court shall so direct, to the next term. Bond may be required, and fine imposed and proceedings had thereon as in other cases of defaulting witnesses.