Link files correctly