Add debug flag to bundled test
Refactor destroy error to variable
Add new test case for destroy()