Any circuit court or any court of record shall have power to issue capiases, in the first instance, for any witness or witnesses in criminal cases, when it shall satisfactorily appear that such witness or witnesses are material and that there will be danger of the loss of their testimony unless such writ be issued.