Recursive write

This bug bit me almost as soon as I started to use the code