Expanded error output for invoke to include arguments.
Debug check for log writable
Added additional logging
Encapsulated write to conosle in try/catch. This allows ODI and other tools that redirect console to execute the app successfully.