Bug 955538: Fix error handling in mongodb stop routine