restored target directory setting, based on env variable