fixed IOError on readNames()