clean up
gracefully exit on failure