The dive and sample xml tags were not closed properly if an error occurred during parsing.
The XML output format exports all dives to a single xml file.