This issue happens if the AIFF or WAVE files you are saving are smaller than the size they report. See also the following discussion and the issue linked there:
This seems to be a rather common problem with AIFF and WAVE files. Basically the files are truncated in some way. As discussed in the linked issue it might be possible to correct such issues automatically, but this needs to be investigated.