displaying the selected file in the viewer