just use ch.close().sync()