changed tablename and added database name to log