fixed a bug, return File instead of array from merged_regions