add environment parameter to pluginOperation

modify EnvironmentUtil to make it more consistent