cocoa_errors edited to use warns instead of puts