The Fire Marshal or deputy fire marshal may make formal complaint of the act of such witness to the judge of any court of record of the county in which the investigation is being held; and, if it shall then appear that the witness is guilty of a violation of Section 36-19-20, he shall, unless good cause is shown to the contrary, be imprisoned in the county jail until he purges himself of contempt.