Added rough local error handling to allow testing in public net