wav: return meaningful errors