added more tests and fixe problem with logging