Add three test cases, improve debug logging again