The taking of such testimony by such mayor or justice shall not prevent the grand jury from making a thorough investigation of any matter inquired into before such justice of the peace, nor shall the same in any way bar any criminal prosecution not finally disposed of and punished by such justice of the peace.