You're encoding FITS in XML? That's likely part of your problem. XML is not well designed for appending to the end of an existing file. Straight FITS would likely work better for that need. -- Elliotte Rusty Harold elharo at ibiblio.org