fix -config handling, added bad flag catch