added cache directory creation