Update test
Extend logging and fix found bugs