updated mergeFile to include command line inputs