Added extra checks and debugging output to clarify test results