Added more detailed logging to bad headers