Upon return of the order, the judge shall examine the person under oath and if he shall determine, after giving such person an opportunity to be heard, that he refused without legal cause to comply with such subpoena, he may order such person to comply therewith forthwith, and any failure to obey such order may be punished as a contempt of the court.
N.J.S. § 18A:6-22