Added check for audio devices being plugged in