Fixed a bug saving updated file