Added more details to errors that occur when running image_optim