made file string comparing function