The copy of the records shall remain sealed and shall be opened only at the time of trial, deposition or other hearing, upon the direction of the judge, court, officer, attorney, body or tribunal conducting the proceeding, in the presence of all parties who have appeared in person or by counsel at the trial, deposition or hearing. Before directing that the inner envelope or wrapper be opened, the judge, court, officer, attorney, body or tribunal shall first ascertain that either:
42 Pa.C.S. § 6156