This line can throw an `NSFileHandleOperationException` exception, which is a documented eventuality when the file can't be read: NSData *fileData = [handle readDataOfLength:4]; Instead of crashing, log the exception and return `NO`.