add more warnings and fix them
cmdline debug flag for startup debugging