(5)Any person charged with contempt under section 15 may file an affidavit in support of his defence, and the court may determine the matter of the charge either on the affidavits filed or after taking such further evidence as may be necessary, and pass such order as the justice of the case requires.