Restore lost changes
Further work on file API