fix error handling in qos-scripts