Handle environment variables and make sure we die after 100 seconds #3532