improved gridfs write with a qthreadpool