Added 'failed' logging
If the muonlab process shuts down, don't wait