Make file paths relative and change compile order