generate errhist from sam
more text