mergetoFile: check if output already exists
corrected totalfiles