simplify SetDSerror - no need to keep the error in a static variable - always print the error code - reduce the required stack-size - reduce the number of snprintf calls (and code size)