Adding support for cached image files, initial debugging