hide sql queries from log

(cherry picked from commit 446c292d5b4c92bb019f854710f4016aa24d5697)
Error logging and LINQ fix