Fix bug whith null list, tests pass, add logger