Added sanity checks to patchmaker and cleaned up output