Revert "remove outdated env loading"

This reverts commit 17b849b8c1f658dfae06a6f20ed9a98bf722764d.