ImageHandler creates a new File ready to be written to in order to write the image data to disk:
However, unlike what's done with some other handlers such as BinaryDataHandler, it is never closed.
Whenever an IOException is raised, outFile remains open and we end up with a 0 size file lingering on the disk that is not associated with any complex obs: a ghost empty file.
There is no workaround for this. Those 0 sizes occurrences have to be spotted and deleted manually.