updated log format
updated log format
fixed minor errors
changed query logging to debug mode