Added random functionality and additional input error checking to both ups_delay.xml and ups_error.xml