Added basic file level caching to limit writes to disk when running tasks.