ADD: complete XML output, and save the masks as well to a sub-folder