Added isDebug option that writes to NSLog.