Added Sql Logging