adds new check-create-image code.