Bad design here of "log and throw". Don't do it. Just throw the exception and let it be handled, and logged, in one place. At the very least, we don't need the error message to go into the STDERR logs with printStackTrace, please remove. And remove the stringifyException code. Just use the normal logging faciltiies at the 'debug' level logging to hide the stack trace during normal operations.