printstacktrace crashes in IOS. protecting with DEBUG flag