Check return value and call ch.finish()