Replace all die("BUG: ...") calls by BUG() ones