Adds error reporting functions to bypass wsod