fix bug in merge individual files (use lapply instead of sapply). Add options for warning message display