fixing test failure and added logging to know where the test breaks