added logic to only check subset with smaller file
fixed conflicts