Apply default env and make static root optional