Logging and minor fix for WCF