(given neither 2.root nor 3.root exist), hadd tends to create the 1.root anyway, and its size is not null. I could not find a proper way to tell hadd not to create the 1.root in such case - did I miss it? If not and such functionality is indeed missing, can a flag to achieve this be added please?
$ hadd 1.root 2.root 3.root
hadd Target file: 1.root
hadd compression setting for all output: 1
hadd Source file 1: 2.root
Error in <TFile::TFile>: file 2.root does not exist
Error in <TFileMerger::AddFile>: cannot open file 2.root
hadd exiting due to error in 2.root
But I agree 1.root is created. May be check the existence of 2.root and 3.root before calling hadd.