Should fix logging and make new code work.