add mergeFile method