Change in sql
error in logging fixes