validate input / output balance