script to merge root files