cli: move config open/close to main() from subcommands