Added caching for files/bags