Moved an NSLog for using a deprecated method to inside its condition.