Updated Image error logic