Moved environment checking to config pkg