Add support to save images to disk
Add support for flushing the cache