add import merging functionality, fix error handling in uci_import