bug-fix, adding debug output to test logic