Make wave file writing optional.