Modify launcher.py to support refactor