nice error message on broken headers

show less cryptic error message when record header is broken