replaced WAV writer with stdlib wave module