write distributions to log