wip: Always clear .wit directory before building database and fix short-circuit bug.