[#9] Functions serialize and fileNameLogic, more efficient save method