Added writing to Output file leftelement from Secoundinput,but aways
parent is root.