adding try except to images