Added thread sleep for mongo server