Add error handling for mod/plugin files