Bugfix: output logging elapsed seconds for each query
enhanced detecting primary_key error
reformat logging message