pass target dir as env var