add debug output to ext/test