func: realized editing and save to file functionality (for DataFile)