add CSV logging