add error handling, set *_proxy instead of *_PROXY
restore ENV after tests