I am having a rare crash when calling FileHandle(forWritingTo:) initializer with a file that does not exist.
In the documentation, I see that the expected behaviour is to return nil, but in my app, in rare cases I have a Crash.
My code that causes the crash is
if let handle = try? FileHandle(forWritingTo: logFile) {
Is it a known behaviour ? should I test if the file exist before calling FileHandle(forWritingTo:)
?