Added os.path.expandvars to handle using  in the values of .env