6(4)If a dispute arises as to the correctness of any claim, or the sheriff for the sheriff’s own protection thinks it proper to do so, the sheriff may apply to a judge of The Court of King’s Bench of New Brunswick on petition, stating the facts as to the money in the sheriff’s hands and the claim filed, and obtain a summons calling on the debtor and claimant to appear before the judge at a time and place to be named in the summons, and the judge, on hearing the parties or such of them as appear at the return of the summons, may make such order as the judge considers just, and the sheriff’s obedience to the order is a defence to the sheriff in any proceedings that the claimant or debtor may bring against the sheriff in respect of any sum that the sheriff may pay in accordance with the order.