Update to check environment