The fundamental problem is with RTW-BI.exe since it's trying to do a division by zero. Your mod is responsible only in the sense that it's asking the exe to do something it ought to handle without crashing, but doesn't.