error handling for mongo