Add missing exit(1) after writing error

Signed-off-by: Michael Crosby <michael@docker.com>