Change design of GridFS file write.