Partial fix for bug 1309197 improve log and error messages