Improve handling of empty environment
Don't crash if playing ringtone fails, sleep