rpearce: Adding common exception handling to image storage