Clean up the mod load error handling
Clean up some unused code in util.cpp