add check data valid in getStringFromFile

so far no check would be crashed when getData faild.
maybe return an empty string is better.