exit if encimage fails