New York (CNN) Harvey Weinstein's defense attorneys filed a letter Wednesday asking the judge in his sexual assault trial in New York to step aside after the way he admonished the disgraced film producer for using a cell phone in court.

The letter motion from Weinstein attorney Arthur Aidala says comments made Tuesday in open court by New York County Judge James Burke were "prejudicial and inflammatory."

Aidala pointed to a moment when Burke asked, "Mr. Weinstein, I could not implore you more to not answer the following question: Is this really the way you want to end up in jail for the rest of your life, by texting in violation of an order? Is it?"

Weinstein is on trial for allegedly raping a woman in 2013 and sexually assaulting another woman in 2006.

At the beginning of court proceedings Tuesday, Burke raised his voice and reprimanded Weinstein and his defense team for his use of his cell phones.

Read More