need to sort data according to chr then start coordinate in each BED file, before merging. Added this step.