Moving binPath to closure and adding useGlobalPhantom option.