Fix to refactor for wav files