Reinhold adding additional logging changes, as well as adding casts and changes to import headers to cope with path changes going from xcode 4.3 to xcode 5.
This code needs xcode 5.02 to run