Added function historyBufferReadNext