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.

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.

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.

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