Update
I have resolved and removed the distracting error. Please read the entire post and feel free to leave comments if any questions remain.
You should consider using NSStream (NSOutputStream/NSInputStream)
. If you are going to choose this approach, keep in mind that background thread run loop will need to be started (run) explicitly.
NSOutputStream has a method called outputStreamToFileAtPath:append:
which is what you might be looking for.
Similar question :
Writing a String to an NSOutputStream in Swift