Add simple assertion for cleanup() error passing