Finished initial implementation of custom error valve