Greatly improve error detection/reporting