Added logging to distributed gradient descent