change config and argv behavior, add some bootstrap code