read file and checkcalculate