Judgment unanimously reversed on the law and new trial granted. Memorandum: Because defendant, in this nonjury trial, did not sign a written waiver of his right to a trial by jury, his conviction cannot be sustained (see, NY Const, art I, § 2; CPL 320.10). It is difficult to comprehend why the trial court, having initially recognized this fundamental error, refused to grant defense counsel’s timely CPL 330.30 motion (see, Zawistowski v Arcara, 132 AD2d 1000, lv denied 70 NY2d 604). Additionally, it was error for Supreme Court to close the courtroom, over defendant’s objection, without making adequate inquiry or possessing a compelling reason for doing so, during the testimony of the alcoholism counselor (see, People v Jones, 47 NY2d 409, 413-417, cert denied 444 US 946). Further, the trial court overstepped its bounds and assumed the role of a prosecutor by engaging in excessive examination of witnesses and, on its own motion, recalling a witness to testify after the close of the prosecution’s case (see, People v Jacobsen, 140 AD2d 938, 940; People v Ellis, 62 AD2d 469, 470-471).
We have reviewed defendant’s remaining contentions and find them without merit. (Appeal from judgment of Supreme *951Court, Erie County, Kubiniec, J.—attempted murder, second degree.) Present—Callahan, J. P., Doerr, Denman, Green and Lawton, JJ.