Added logging macros for error and warning and converted project to use them instead of NSLog