Do stuff in @hook.onload, instead of just when plugin is loading. I think it would be a good idea to make @hook.onload async at some point, with the required precautions