ctdb-tools: Improve error handling