Add wav writing