modified data and made costBenefit check for file