Improved result check script
Fixed compile #include bugs