Update method saveFileAs to proper write content and list atribute for key tags