Fixed EOFException by reading the elements header using ringRead
Using RandomeAccessFile#readInt will fail if reading at the edge of the file