Seems that the content of the file can't be found. The Mendix object is available but the file is not to be found on the filesystem. You could try and add a function to test this. Add a java action that has one of the files you try to merge and perform an action like below in the java action:
try{
InputStream content = Core.getFileDocumentContent(context, file.getMendixObject());
}
catch (IOException e) {
throw new RuntimeException("Failed to retrive file" + e.getMessage(), e);
If this fails the document is not available on the file system, could be that the objects were moved with a db restore, but the files were not moved to the server?