logging working, output duplicating though.