Changed logging around a bit