now using unbuffered IO, but a manually buffered index (pug.c)