Add ForeignId.ToString()

Otherwise it's not shown correctly in a code like
log.InfoFormat("blah-blah-blah {0}", foreignId );
Fix NullReferenceException

Occasionally it happened inside
SafelyCloseRequest. It was safe as the method
should be, but not pleasant to checking for that.