Introduce and use a fifo_read function