stop using bzero() and check a few return values