If we're going to make a writer around System.err, I think I would prefer to just use that throughout this method.  So do this at the start, and replace the System.err.print* invocations with calls to your writer that you are sharing with the args4j library.