In any summons-case instituted otherwise than upon a complaint, a Magistrate of the first class—or any other Judicial Magistrate with the prior sanction of the Chief Judicial Magistrate—may, at any stage of the proceedings and for reasons recorded in writing, stop the proceedings without pronouncing a judgment. If such stoppage occurs after the evidence of the principal witnesses has been recorded, the Magistrate shall pronounce a judgment of acquittal. In any other case, the accused shall be released, and such release shall have the effect of a discharge.