Removed resource warnings
Command execution generated errors during the writing
of the command output. So I changed this to execute
inline with the doIncludeResource handling, seeing
any errors early. It also turned out that the build
got screwed if an exception was raised during write. Fixed
this as well.
New version for testing