Added file loading functionality to viewer