Fix for PS v3
Added support for ContinueOnError option