Fix err typo, allow you to pass in raw MongoDB db