add elements to file