Error 516: Unable to write: Broken pipe

Here's a recent thread discussing error 516 ...

Posting your code might help.