Water reuse in chemical processes