handling wav file errors