Input and output root files work with threads