change debug output to to NSLog