Add a way to set run loop mode