Add safe mode
Add a safe mode which makes a backup of the file and then at the end asks the user if all files are ok and if not runs through all the files and lets the user indicate which ones are ok and which ones are not. If a file is marked ok the backup is removed and if it is not ok the backup replaces the new file