Writing to root file implemented - to be tested