Update logging code