Switch to python file to enable better control over execution