Shouldn't gridfs be unqiue by filename? Otherwise the same file can be added more than once, at least via mongofiles command-line utility.