Added tty check for test driver
Better error checking in hashsum sample