main: parse argv and init config in 1 pass