Rewrite read_file() to use a single static buffer.