sort and merge 2 file using heap