improved proc_dump() and Sandbox_dump() to handle some marginal conditions