Flushing the streams and closing connections properly. We are using cached connections, so this is a noop, but good practice