https://wadetregaskis.com/swifts-string-writetofile-cant-handle-tildes/
Swift's String.write(toFile:…) can't handle tildes