[refactor] make index.py path-agnostic