Fix cache image and add some logging