Court OKs retrieval of terror-case files