fix null reference which happens when the "log" table doesn't exist
(it won't until the user runs the application the first time)