fixed a buffer overflow
use bson_destroy to properly free bson resources
store requests in mongodb