Fixed storage bug

Fixed bug where files would not be stored to the cache directory