example-gridfs: check result from fwrite.
example-gridfs: call mongoc_cleanup().