fix log problems when running as a daemon.

minor firsttime addition for notes table