added logging to exceptions in the test