BOSTON (AP) — A man accused of secretly filming boys in restrooms at a Boston high school will be detained pending the outcome of his trial.

Magistrate Judge M. Page Kelley wrote in an order issued Saturday that 36-year-old Eric Tran Thai poses a risk of flight and danger to the community if released.

READ MORE: Newbury Street To Have 3 Car-Free Days In August

Thai is charged with videotaping students at Boston Latin School while as they used stalls or urinals. Thai also faces state charges for allegedly filming in men’s restrooms at Boston College.

READ MORE: Your 4 Community: Cradles To Crayons

Eric Tran Thai outside Boston federal court (WBZ-TV)

Prosecutors have said a search of devices taken from Thai’s home also turned up folders with labels including MIT and Harvard. The forensic analysis of those files is ongoing.

Thai’s attorney has told The Boston Herald that he will appeal the detention order.

MORE NEWS: Service Resumes On Green Line Hours After Trains Crash In Boston

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)