problem with dd command or maybe AFS problem

Hi, folks.

Sorry for bothering, but maybe someone could help me please.

The problem is the following:
there is some script that copies files from local file system to AFS. The copying is performed with dd command.
The script copies data into some AFS volumes.
The problem appeared with one volume.

Before I thought (and I could see it is so) that if we copy some file into AFS, and quota can be exceeded, dd fails (dd: write error: Disk quota exceeded), but this copied data (any part of it) will not be kept in AFS.
That is if "fs q" showed 80% used before dd, it shows 80% used after failure of dd.

In my case:
before dd we had 95%used, one file (about 40MB) is copied, dd failed, I receive only "afs: failed to store file (over quota)", and "fs q" shows 100% used.
And I see that part of the copied file data is kept on AFS.
The problem is this script is called in other script, and that wrapper script cannot complete in such case.

I'm sorry, maybe I explained it too mazy.

Thanks in advance.

Anta