added check, to create cache directory if missing