Add error checking to decimal debug I/O