Feature/mongo 2.6.5 integration

Lots of fixes found during integration with other tools that are using this.
Stitch can throw (first line) so it ought to be inside a try.