fixed issue with getline() on apple computers and added one sanity check for gensgd