Fix issue when opening symlinked files