Update env to use dirname