added DebugMsg function
program creates common database after start