added DieIf/PrintfIf to help with errors