refine file to merge