Use $expected_prefix in the log message too