Correctly handle multiple files when oneFileOnly flag is true.