add fifo read size option, error checking on headers