Added pendingupdate switch, Fixed IndexOf Missing

Added pendingupdate switch for output of only needed updates. Work around to problem "Method invocation failed because [System.Object[]] doesn't contain a method named 'Indexof'" due to collections not having this method.