Merge files before embedding