improved file caching