minor fixes and send logs to diag service

You could log tableName here to give some more hints.