implement uci_set, improve error handling