Accidental call to a getter returning null instead of the default value of zero
Two areas left where a single error writing out a file would stop all other files being written