Ensure the full path of the current file is used. Otherwise, errors can occurr when saving changes.