update bundle path
optimize init_env method