You don't have to use substr for single characters.  Just dbfile.name[0] is fine here.