Fixed a path issue when opening files