To prevent it from happening again, right-click the file, Properties, check Read-only