eating error exceptions wile saving images