make the debug directory if it does not exist
make the chainable instrumentation work with null objects