Swap out lengthy directory check for environmental variable