add TOOL_DEBUG_ON_ERROR param, so dprintf output in the tools can be saved and printed out when the tool returns error. #3594
===VersionHistory:Pending===