Clean up code, ensure open failures.