#748 - improve mergeFiles method in test environment