move header error logging to after CRC check