write error checking header to out serial buffer