parse env from prefs file, if it is specified

Change-Id: I352a89012c6e90db2c4e68c24dcbeb5c3a619bee