Fix wrong test and add logging