add a logger, closes #172