read from virtual files a bit more efficiently