Added logging to StackEnvironment