Added test mode variable, allows for failure testing without logging errors.