Make sure error output is grouped together.  Can't change the process working directory from thread.  Gather thread error codes to allow clean exit