make some changes in log filtering merging and sorting